package cn.tedu.day02;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test01 {
  /*  @Test
  public  void Test00(){
      ApplicationContext ac=new ClassPathXmlApplicationContext("beans.xml");
      Demo d=(Demo)ac.getBean("demo");
      System.out.println(d);
      ((ClassPathXmlApplicationContext)ac).close();
  }*/
  @Test
    public  void Test02(){
        ApplicationContext ac=new ClassPathXmlApplicationContext("beans.xml");
        Context context=(Context)ac.getBean("context");
        System.out.println(context);
        ((ClassPathXmlApplicationContext)ac).close();
    }

}
